<?php
/**
 * The Template for displaying all single posts.
 *
 * @package WordPress
 * @subpackage Twenty_Ten
 * @since Twenty Ten 1.0
 */
get_header(); 
the_post(); 
//print_r($_SERVER);

?>

<div class="main">
    <div class="main_left">
	  <!--main_left_box START--> 
      <div class="main_left_box">
	    <!--main_left_box_01 START--> 
        <div class="main_left_box_main">
			<div class="main_left_box_main_h">
				<!--<a href="<?php echo $_SERVER[REQUEST_URI];?>">--><a href="http://www.transfer-iphone-recovery.com/blog">Back to the Blog of TIR</a>
			</div>
          <dl>
            <dt>
              <h3><?php echo $post->post_title; ?></h3>
            </dt>
            <dd class="author">By <?php echo ucwords(get_the_author()); ?> On <?php the_time('F j, Y') ?> · <!--Add Comment--> <?php comments_popup_link( __( 'Add Comment', 'momo' ), __( '1 Comment', 'momo' ), __( '% Comments', 'momo' ) ); ?></dd>
            <dd>
				<?php echo wpautop($post->post_content); ?>
            </dd>
          </dl>
          
          <div class="line"></div>
          
         <div class="related_posts"><?php wp_related_posts(); ?> </div>
         
		  <?php comments_template( '', true ); ?>
          
		  <!--<dl class="main_left_box_main_ul">
		  	<dt>Related posts:</dt>
			<dd>
				<ul>
					<li>How to Sync Audiobooks in the Cloud</li>
					<li>Preparing a Media Library for iTunes Match</li>
					<li>iTunes lists the best of 2012: Top Music, Movies and TV Shows</li>
				</ul>
			</dd>
		  </dl>-->
        </div>
		<!--main_left_box_01 END-->
      </div>
	  <!--main_left_box END-->
	  
    </div>
    
    <div class="main_right">
	<!--main_right_box START-->
      <div class="main_right_box">
        <div class="main_right_box_top">
          <div class="main_box_title1"></div>
          <div class="main_box_title2 short">
            <h2> <!--<a href="<?php echo $_SERVER[REQUEST_URI];?>">-->Join TIR Now!</h2>
          </div>
          <div class="main_box_title3"></div>
        </div>
        <div class="main_right_box_nr">
          <div class="main_right_lb2">
            <ul>
              <li><a href=" https://www.facebook.com/transferiphonerecovery" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/facebook.jpg" alt="" title="" /></a></li>
              <li><a href="https://twitter.com/stevenjohn2013" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/twitter.jpg" alt="" title="" /></a> </li>
              <li><a href="https://plus.google.com/103615911574536298593" target="_blank"><img src="<?php bloginfo('template_directory'); ?>/images/google+.png" alt="" title="" /></a> </li>              
            </ul>
          </div>
        </div>
      </div>
	  <!--main_right_box END-->
	<!--Categories START-->
	<!--main_right_box START-->
      <div class="main_right_box">
        <div class="main_right_box_top">
          <div class="main_box_title1"></div>
          <div class="main_box_title2 short">
            <h2>Categories</h2>
          </div>
          <div class="main_box_title3"></div>
        </div>
        <div class="main_right_box_nr">
          <div class="main_right_lb3">
            <ul>
            <?php
			// 得到所有分类列表
			$categories = get_categories();
			// 循环所有分类
			foreach ($categories as $cat) {
			// 得到分类ID
			$catid = $cat->cat_ID;
			$cat_name = $cat->cat_name;
			
			// 得到分类下10篇最新文章
			query_posts("showposts=10");
			?>
			<li> <span class="mr_span">•</span> <a href="<?php echo get_category_link($catid);?>"><?php echo $cat_name;?></a> </li>
			<?php } ?>
			  <!--<li> <span class="mr_span">•</span> <a href="">App Resources</a> </li>
              <li> <span class="mr_span">•</span> <a href="">Apple News</a> </li>
              <li> <span class="mr_span">•</span> <a href="">Apple Software Tips</a> </li>
              <li> <span class="mr_span">•</span> <a href="">Apple TV 3</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">iFunia Announcements</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">iPad Resources</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">iTunes</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">Mac Tips</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">Tech News</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">Uncategorized</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">YouTube Tips</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">Hot Movies & Music</a> </li>-->
            </ul>
          </div>
        </div>
      </div>
	  <!--main_right_box END-->
	  <!--Recent Posts START-->
	  <!--main_right_box START-->
      <div class="main_right_box">
        <div class="main_right_box_top">
          <div class="main_box_title1"></div>
          <div class="main_box_title2 short">
            <h2>Recent Posts</h2>
          </div>
          <div class="main_box_title3"></div>
        </div>
        <div class="main_right_box_nr">
          <div class="main_right_lb3">
            <ul>
            <!--输出10篇最新文章的标题及链接-->
                <?php while (have_posts()) : the_post(); ?>
                <li> <span class="mr_span">•</span> <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>">
				<?php echo mb_strimwidth($post->post_title, 0,30 ,"..."); ?></a> </li>
                <?php endwhile; ?>
              <!--<li> <span class="mr_span">•</span> <a href="">Rip DVD on Mac</a> </li>
              <li> <span class="mr_span">•</span> <a href="">Convert DVD to MKV</a> </li>
              <li> <span class="mr_span">•</span> <a href="">Convert DVD to iPhone 4</a> </li>
              <li> <span class="mr_span">•</span> <a href="">Convert DVD to WMV</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">Convert DVD to iPad Mac</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">Import DVD to Final Cut Pro</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">Rip DVD to iTunes</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">Mac DVD Ripper Review</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">Import DVD to Final Cut Pro</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">Convert MOV to AVI</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">Convert WMV to MOV Mac</a> </li>
			  <li> <span class="mr_span">•</span> <a href="">Convert WMV to MOV Mac</a> </li>-->
            </ul>
          </div>
        </div>
      </div>
	  <!--main_right_box END-->
	  <!--main_right_box START-->
      <div class="main_right_box">
        <div class="main_right_box_top">
          <div class="main_box_title1"></div>
          <div class="main_box_title2 short">Hot Tags</div>
          <div class="main_box_title3"></div>
        </div>
        <div class="main_right_box_nr color" style="text-align:center;">
        	<?php if ( function_exists('wp_tag_cloud') ) : ?>
			<?php //wp_tag_cloud('unit=px&smallest=12&largest=30'); ?>
            <?php wp_tag_cloud('unit=pt&smallest=8&largest=18'); ?>
            <?php endif; ?>
            
			<!--<a href="">1080p</a><a class="fs_18" href="">Apple TV</a><a href="">app</a>
			<a href="">Audio AVCHD AVI</a><a class="fs_18" href="">Christmas</a><a href="">Download</a>
			<a href="">YouTube Video</a><a class="fs_18" href="">DVD</a><a href="">CREATOR For Mac</a>
			<a href="">DVD Ripper For Mac</a><a class="fs_18" href="">DVD to ipad Converter</a><a href="">Father's Day Free Download</a>
			<a href="">youTube Video</a><a class="fs_18" href="">Holiday</a><a href="">Holiday Gift iMovies</a>
			<a href="">iPad</a><a class="fs_18" href="">ipad apps ipad mini ipad</a><a href="">video converter fot mac</a>-->
		</div>
      </div>
	  <!--main_right_box END-->
    </div>
	<!--main_right END-->
  </div>
			<?php
			/* Run the loop to output the post.
			 * If you want to overload this in a child theme then include a file
			 * called loop-single.php and that will be used instead.
			 */
			//get_template_part( 'loop', 'single' );
			?>

<?php //get_sidebar(); ?>
<?php get_footer(); ?>
